3.3.7 \(\int x \cos ^2(x) \cot ^3(x) \, dx\) [207]

3.3.7.1 Optimal result
3.3.7.2 Mathematica [A] (verified)
3.3.7.3 Rubi [A] (verified)
3.3.7.4 Maple [A] (verified)
3.3.7.5 Fricas [B] (verification not implemented)
3.3.7.6 Sympy [F]
3.3.7.7 Maxima [B] (verification not implemented)
3.3.7.8 Giac [F]
3.3.7.9 Mupad [F(-1)]

3.3.7.1 Optimal result

Integrand size = 10, antiderivative size = 73 \[ \int x \cos ^2(x) \cot ^3(x) \, dx=-\frac {3 x}{4}+i x^2-\frac {\cot (x)}{2}-\frac {1}{2} x \cot ^2(x)-2 x \log \left (1-e^{2 i x}\right )+i \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{4} \cos (x) \sin (x)+\frac {1}{2} x \sin ^2(x) \]

output
-3/4*x+I*x^2-1/2*cot(x)-1/2*x*cot(x)^2-2*x*ln(1-exp(2*I*x))+I*polylog(2,ex 
p(2*I*x))+1/4*cos(x)*sin(x)+1/2*x*sin(x)^2
 
3.3.7.2 Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.85 \[ \int x \cos ^2(x) \cot ^3(x) \, dx=\frac {1}{8} \left (8 i x^2-2 x \cos (2 x)-4 \cot (x)-4 x \csc ^2(x)-16 x \log \left (1-e^{2 i x}\right )+8 i \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\sin (2 x)\right ) \]

input
Integrate[x*Cos[x]^2*Cot[x]^3,x]
 
output
((8*I)*x^2 - 2*x*Cos[2*x] - 4*Cot[x] - 4*x*Csc[x]^2 - 16*x*Log[1 - E^((2*I 
)*x)] + (8*I)*PolyLog[2, E^((2*I)*x)] + Sin[2*x])/8
 
3.3.7.3 Rubi [A] (verified)

Time = 0.93 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.27, number of steps used = 27, number of rules used = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 2.600, Rules used = {4908, 3042, 25, 4203, 25, 3042, 25, 3954, 24, 4200, 25, 2620, 2715, 2838, 4908, 3042, 25, 3924, 3042, 3115, 24, 4200, 25, 2620, 2715, 2838}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x \cos ^2(x) \cot ^3(x) \, dx\)

\(\Big \downarrow \) 4908

\(\displaystyle \int x \cot ^3(x)dx-\int x \cos ^2(x) \cot (x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -x \tan \left (x+\frac {\pi }{2}\right )^3dx-\int x \cos ^2(x) \cot (x)dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int x \tan \left (x+\frac {\pi }{2}\right )^3dx-\int x \cos ^2(x) \cot (x)dx\)

\(\Big \downarrow \) 4203

\(\displaystyle \frac {1}{2} \int \cot ^2(x)dx+\int -x \cot (x)dx-\int x \cos ^2(x) \cot (x)dx-\frac {1}{2} x \cot ^2(x)\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{2} \int \cot ^2(x)dx-\int x \cot (x)dx-\int x \cos ^2(x) \cot (x)dx-\frac {1}{2} x \cot ^2(x)\)

\(\Big \downarrow \) 3042

\(\displaystyle -\int -x \tan \left (x+\frac {\pi }{2}\right )dx+\frac {1}{2} \int \tan \left (x+\frac {\pi }{2}\right )^2dx-\int x \cos ^2(x) \cot (x)dx-\frac {1}{2} x \cot ^2(x)\)

\(\Big \downarrow \) 25

\(\displaystyle \int x \tan \left (x+\frac {\pi }{2}\right )dx+\frac {1}{2} \int \tan \left (x+\frac {\pi }{2}\right )^2dx-\int x \cos ^2(x) \cot (x)dx-\frac {1}{2} x \cot ^2(x)\)

\(\Big \downarrow \) 3954

\(\displaystyle \int x \tan \left (x+\frac {\pi }{2}\right )dx+\frac {1}{2} (-\int 1dx-\cot (x))-\int x \cos ^2(x) \cot (x)dx-\frac {1}{2} x \cot ^2(x)\)

\(\Big \downarrow \) 24

\(\displaystyle \int x \tan \left (x+\frac {\pi }{2}\right )dx-\int x \cos ^2(x) \cot (x)dx-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 4200

\(\displaystyle -2 i \int -\frac {e^{2 i x} x}{1-e^{2 i x}}dx-\int x \cos ^2(x) \cot (x)dx+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 25

\(\displaystyle 2 i \int \frac {e^{2 i x} x}{1-e^{2 i x}}dx-\int x \cos ^2(x) \cot (x)dx+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 2620

\(\displaystyle 2 i \left (\frac {1}{2} i x \log \left (1-e^{2 i x}\right )-\frac {1}{2} i \int \log \left (1-e^{2 i x}\right )dx\right )-\int x \cos ^2(x) \cot (x)dx+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 2715

\(\displaystyle 2 i \left (\frac {1}{2} i x \log \left (1-e^{2 i x}\right )-\frac {1}{4} \int e^{-2 i x} \log \left (1-e^{2 i x}\right )de^{2 i x}\right )-\int x \cos ^2(x) \cot (x)dx+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 2838

\(\displaystyle -\int x \cos ^2(x) \cot (x)dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 4908

\(\displaystyle -\int x \cot (x)dx+\int x \cos (x) \sin (x)dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 3042

\(\displaystyle -\int -x \tan \left (x+\frac {\pi }{2}\right )dx+\int x \cos (x) \sin (x)dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 25

\(\displaystyle \int x \tan \left (x+\frac {\pi }{2}\right )dx+\int x \cos (x) \sin (x)dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 3924

\(\displaystyle -\frac {1}{2} \int \sin ^2(x)dx+\int x \tan \left (x+\frac {\pi }{2}\right )dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {1}{2} \int \sin (x)^2dx+\int x \tan \left (x+\frac {\pi }{2}\right )dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 3115

\(\displaystyle \int x \tan \left (x+\frac {\pi }{2}\right )dx+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {\int 1dx}{2}\right )+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))\)

\(\Big \downarrow \) 24

\(\displaystyle \int x \tan \left (x+\frac {\pi }{2}\right )dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+\frac {i x^2}{2}+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {x}{2}\right )\)

\(\Big \downarrow \) 4200

\(\displaystyle -2 i \int -\frac {e^{2 i x} x}{1-e^{2 i x}}dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+i x^2+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {x}{2}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle 2 i \int \frac {e^{2 i x} x}{1-e^{2 i x}}dx+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+i x^2+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {x}{2}\right )\)

\(\Big \downarrow \) 2620

\(\displaystyle 2 i \left (\frac {1}{2} i x \log \left (1-e^{2 i x}\right )-\frac {1}{2} i \int \log \left (1-e^{2 i x}\right )dx\right )+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+i x^2+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {x}{2}\right )\)

\(\Big \downarrow \) 2715

\(\displaystyle 2 i \left (\frac {1}{2} i x \log \left (1-e^{2 i x}\right )-\frac {1}{4} \int e^{-2 i x} \log \left (1-e^{2 i x}\right )de^{2 i x}\right )+2 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+i x^2+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {x}{2}\right )\)

\(\Big \downarrow \) 2838

\(\displaystyle 4 i \left (\frac {1}{4} \operatorname {PolyLog}\left (2,e^{2 i x}\right )+\frac {1}{2} i x \log \left (1-e^{2 i x}\right )\right )+i x^2+\frac {1}{2} x \sin ^2(x)-\frac {1}{2} x \cot ^2(x)+\frac {1}{2} (-x-\cot (x))+\frac {1}{2} \left (\frac {1}{2} \sin (x) \cos (x)-\frac {x}{2}\right )\)

input
Int[x*Cos[x]^2*Cot[x]^3,x]
 
output
I*x^2 + (-x - Cot[x])/2 - (x*Cot[x]^2)/2 + (4*I)*((I/2)*x*Log[1 - E^((2*I) 
*x)] + PolyLog[2, E^((2*I)*x)]/4) + (x*Sin[x]^2)/2 + (-1/2*x + (Cos[x]*Sin 
[x])/2)/2
 

3.3.7.3.1 Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2620
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ 
((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp 
[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si 
mp[d*(m/(b*f*g*n*Log[F]))   Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x 
)))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
 

rule 2715
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] 
:> Simp[1/(d*e*n*Log[F])   Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) 
))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3924
Int[Cos[(a_.) + (b_.)*(x_)^(n_.)]*(x_)^(m_.)*Sin[(a_.) + (b_.)*(x_)^(n_.)]^ 
(p_.), x_Symbol] :> Simp[x^(m - n + 1)*(Sin[a + b*x^n]^(p + 1)/(b*n*(p + 1) 
)), x] - Simp[(m - n + 1)/(b*n*(p + 1))   Int[x^(m - n)*Sin[a + b*x^n]^(p + 
 1), x], x] /; FreeQ[{a, b, p}, x] && LtQ[0, n, m + 1] && NeQ[p, -1]
 

rule 3954
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d 
*x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2   Int[(b*Tan[c + d*x])^(n - 2), x] 
, x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
 

rule 4200
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (f_.)*(x_)], x_Symbol 
] :> Simp[I*((c + d*x)^(m + 1)/(d*(m + 1))), x] - Simp[2*I   Int[(c + d*x)^ 
m*E^(2*I*k*Pi)*(E^(2*I*(e + f*x))/(1 + E^(2*I*k*Pi)*E^(2*I*(e + f*x)))), x] 
, x] /; FreeQ[{c, d, e, f}, x] && IntegerQ[4*k] && IGtQ[m, 0]
 

rule 4203
Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symb 
ol] :> Simp[b*(c + d*x)^m*((b*Tan[e + f*x])^(n - 1)/(f*(n - 1))), x] + (-Si 
mp[b*d*(m/(f*(n - 1)))   Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1), x] 
, x] - Simp[b^2   Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; Free 
Q[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 0]
 

rule 4908
Int[Cos[(a_.) + (b_.)*(x_)]^(n_.)*Cot[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d 
_.)*(x_))^(m_.), x_Symbol] :> -Int[(c + d*x)^m*Cos[a + b*x]^n*Cot[a + b*x]^ 
(p - 2), x] + Int[(c + d*x)^m*Cos[a + b*x]^(n - 2)*Cot[a + b*x]^p, x] /; Fr 
eeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]
 
3.3.7.4 Maple [A] (verified)

Time = 4.21 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.49

method result size
risch \(i x^{2}-\frac {\left (2 x +i\right ) {\mathrm e}^{2 i x}}{16}-\frac {\left (-i+2 x \right ) {\mathrm e}^{-2 i x}}{16}+\frac {2 \,{\mathrm e}^{2 i x} x -i {\mathrm e}^{2 i x}+i}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}-2 x \ln \left ({\mathrm e}^{i x}+1\right )-2 x \ln \left (1-{\mathrm e}^{i x}\right )+2 i \operatorname {polylog}\left (2, -{\mathrm e}^{i x}\right )+2 i \operatorname {polylog}\left (2, {\mathrm e}^{i x}\right )\) \(109\)

input
int(x*cos(x)^2*cot(x)^3,x,method=_RETURNVERBOSE)
 
output
I*x^2-1/16*(2*x+I)*exp(2*I*x)-1/16*(-I+2*x)*exp(-2*I*x)+(2*exp(2*I*x)*x-I* 
exp(2*I*x)+I)/(exp(2*I*x)-1)^2-2*x*ln(exp(I*x)+1)-2*x*ln(1-exp(I*x))+2*I*p 
olylog(2,-exp(I*x))+2*I*polylog(2,exp(I*x))
 
3.3.7.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (52) = 104\).

Time = 0.27 (sec) , antiderivative size = 203, normalized size of antiderivative = 2.78 \[ \int x \cos ^2(x) \cot ^3(x) \, dx=-\frac {2 \, x \cos \left (x\right )^{4} - 3 \, x \cos \left (x\right )^{2} + 4 \, {\left (-i \, \cos \left (x\right )^{2} + i\right )} {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + 4 \, {\left (i \, \cos \left (x\right )^{2} - i\right )} {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + 4 \, {\left (i \, \cos \left (x\right )^{2} - i\right )} {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + 4 \, {\left (-i \, \cos \left (x\right )^{2} + i\right )} {\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + 4 \, {\left (x \cos \left (x\right )^{2} - x\right )} \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + 4 \, {\left (x \cos \left (x\right )^{2} - x\right )} \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + 4 \, {\left (x \cos \left (x\right )^{2} - x\right )} \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + 4 \, {\left (x \cos \left (x\right )^{2} - x\right )} \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - {\left (\cos \left (x\right )^{3} + \cos \left (x\right )\right )} \sin \left (x\right ) - x}{4 \, {\left (\cos \left (x\right )^{2} - 1\right )}} \]

input
integrate(x*cos(x)^2*cot(x)^3,x, algorithm="fricas")
 
output
-1/4*(2*x*cos(x)^4 - 3*x*cos(x)^2 + 4*(-I*cos(x)^2 + I)*dilog(cos(x) + I*s 
in(x)) + 4*(I*cos(x)^2 - I)*dilog(cos(x) - I*sin(x)) + 4*(I*cos(x)^2 - I)* 
dilog(-cos(x) + I*sin(x)) + 4*(-I*cos(x)^2 + I)*dilog(-cos(x) - I*sin(x)) 
+ 4*(x*cos(x)^2 - x)*log(cos(x) + I*sin(x) + 1) + 4*(x*cos(x)^2 - x)*log(c 
os(x) - I*sin(x) + 1) + 4*(x*cos(x)^2 - x)*log(-cos(x) + I*sin(x) + 1) + 4 
*(x*cos(x)^2 - x)*log(-cos(x) - I*sin(x) + 1) - (cos(x)^3 + cos(x))*sin(x) 
 - x)/(cos(x)^2 - 1)
 
3.3.7.6 Sympy [F]

\[ \int x \cos ^2(x) \cot ^3(x) \, dx=\int x \cos ^{2}{\left (x \right )} \cot ^{3}{\left (x \right )}\, dx \]

input
integrate(x*cos(x)**2*cot(x)**3,x)
 
output
Integral(x*cos(x)**2*cot(x)**3, x)
 
3.3.7.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1718 vs. \(2 (52) = 104\).

Time = 0.36 (sec) , antiderivative size = 1718, normalized size of antiderivative = 23.53 \[ \int x \cos ^2(x) \cot ^3(x) \, dx=\text {Too large to display} \]

input
integrate(x*cos(x)^2*cot(x)^3,x, algorithm="maxima")
 
output
-1/16*((2*x + I)*cos(6*x)^2 + 4*(8*I*x^2 + 2*x + I)*cos(4*x)^2 + 4*(8*I*x^ 
2 - 7*x + 4*I)*cos(2*x)^2 - (2*x + I)*sin(6*x)^2 + 4*(-8*I*x^2 - 2*x - I)* 
sin(4*x)^2 + 4*(-8*I*x^2 + 7*x - 4*I)*sin(2*x)^2 + 32*(-2*I*x*cos(4*x)^2 - 
 2*I*x*cos(2*x)^2 + 2*I*x*sin(4*x)^2 + 2*I*x*sin(2*x)^2 + (I*x*cos(4*x) - 
2*I*x*cos(2*x) - x*sin(4*x) + 2*x*sin(2*x) + I*x)*cos(6*x) + (5*I*x*cos(2* 
x) - 5*x*sin(2*x) - 2*I*x)*cos(4*x) + I*x*cos(2*x) - (x*cos(4*x) - 2*x*cos 
(2*x) + I*x*sin(4*x) - 2*I*x*sin(2*x) + x)*sin(6*x) + (4*x*cos(4*x) - 5*x* 
cos(2*x) - 5*I*x*sin(2*x) + 2*x)*sin(4*x) + (4*x*cos(2*x) - x)*sin(2*x))*a 
rctan2(sin(x), cos(x) + 1) + 32*(2*I*x*cos(4*x)^2 + 2*I*x*cos(2*x)^2 - 2*I 
*x*sin(4*x)^2 - 2*I*x*sin(2*x)^2 + (-I*x*cos(4*x) + 2*I*x*cos(2*x) + x*sin 
(4*x) - 2*x*sin(2*x) - I*x)*cos(6*x) + (-5*I*x*cos(2*x) + 5*x*sin(2*x) + 2 
*I*x)*cos(4*x) - I*x*cos(2*x) + (x*cos(4*x) - 2*x*cos(2*x) + I*x*sin(4*x) 
- 2*I*x*sin(2*x) + x)*sin(6*x) - (4*x*cos(4*x) - 5*x*cos(2*x) - 5*I*x*sin( 
2*x) + 2*x)*sin(4*x) - (4*x*cos(2*x) - x)*sin(2*x))*arctan2(sin(x), -cos(x 
) + 1) - (16*I*x^2 - 4*(-4*I*x^2 - 2*x - I)*cos(4*x) + (-32*I*x^2 + 26*x - 
 17*I)*cos(2*x) - 4*(4*x^2 - 2*I*x + 1)*sin(4*x) + (32*x^2 + 26*I*x + 17)* 
sin(2*x) + 4*x + 14*I)*cos(6*x) - (-32*I*x^2 - 2*(-40*I*x^2 + 26*x - 17*I) 
*cos(2*x) - 2*(40*x^2 + 26*I*x + 17)*sin(2*x) - 10*x - 27*I)*cos(4*x) + 4* 
(-4*I*x^2 - 2*x - 3*I)*cos(2*x) + 32*((-I*cos(4*x) + 2*I*cos(2*x) + sin(4* 
x) - 2*sin(2*x) - I)*cos(6*x) + (-5*I*cos(2*x) + 5*sin(2*x) + 2*I)*cos(...
 
3.3.7.8 Giac [F]

\[ \int x \cos ^2(x) \cot ^3(x) \, dx=\int { x \cos \left (x\right )^{2} \cot \left (x\right )^{3} \,d x } \]

input
integrate(x*cos(x)^2*cot(x)^3,x, algorithm="giac")
 
output
integrate(x*cos(x)^2*cot(x)^3, x)
 
3.3.7.9 Mupad [F(-1)]

Timed out. \[ \int x \cos ^2(x) \cot ^3(x) \, dx=\int x\,{\cos \left (x\right )}^2\,{\mathrm {cot}\left (x\right )}^3 \,d x \]

input
int(x*cos(x)^2*cot(x)^3,x)
 
output
int(x*cos(x)^2*cot(x)^3, x)